package com.example.Laboratory.Service.Impl;

import com.example.Laboratory.Entity.Lab_conditions;
import com.example.Laboratory.Mapper.Lab_conditionsMapper;
import com.example.Laboratory.Service.Lab_conditionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class Lab_conditionsServiceImpl implements Lab_conditionsService {


    @Autowired
    Lab_conditionsMapper lab_conditionsMapper;


    //增加实验室概况文章
    @Override
    public String addLab_conditions(Lab_conditions t) {
        if (lab_conditionsMapper.addLab_conditions(t) == 1) {
            return "添加成功";
        } else {
            return "添加失败";
        }
    }

    //查找实验室概况文章
    @Override
    public List<Lab_conditions> selectLab_conditions() {
        return lab_conditionsMapper.selectLab_conditions();
    }

    //删除实验室概况文章
    @Override
    public String deleteLab_conditions(int lab_conditions_id) {
        if (lab_conditionsMapper.deleteLab_conditions(lab_conditions_id) == 1) {
            return "删除成功";
        } else {
            return "删除失败";
        }
    }

    //修改实验室概况文章
    @Override
    public String updateLab_conditions(Lab_conditions i) {
        if (lab_conditionsMapper.updateLab_conditions(i) == 1) {
            return "修改成功";
        } else {
            return "修改失败";
        }
    }
}
